home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / SegLoad.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  2.8 KB  |  142 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        SegLoad.h
  3.  
  4.      Contains:    Segment Loader Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1985-1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __SEGLOAD__
  19. #define __SEGLOAD__
  20.  
  21. #ifndef __TYPES__
  22. #include <Types.h>
  23. #endif
  24.  
  25.  
  26.  
  27. #if PRAGMA_ONCE
  28. #pragma once
  29. #endif
  30.  
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34.  
  35. #if PRAGMA_IMPORT
  36. #pragma import on
  37. #endif
  38.  
  39. #if PRAGMA_STRUCT_ALIGN
  40.     #pragma options align=mac68k
  41. #elif PRAGMA_STRUCT_PACKPUSH
  42.     #pragma pack(push, 2)
  43. #elif PRAGMA_STRUCT_PACK
  44.     #pragma pack(2)
  45. #endif
  46.  
  47. #if TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  48. /*
  49.    CountAppFiles, GetAppFiles, ClrAppFiles, GetAppParms, getappparms, 
  50.    and the AppFile data structure and enums are obsolete. 
  51.    They are still supported for writing old style 68K apps, 
  52.    but they are not supported for CFM-based apps.
  53.    Use AppleEvents to determine which files are to be 
  54.    opened or printed from the Finder.
  55. */
  56.  
  57. enum {
  58.     appOpen                        = 0,                            /*Open the Document (s)*/
  59.     appPrint                    = 1                                /*Print the Document (s)*/
  60. };
  61.  
  62. struct AppFile {
  63.     short                             vRefNum;
  64.     OSType                             fType;
  65.     short                             versNum;                    /*versNum in high byte*/
  66.     Str255                             fName;
  67. };
  68. typedef struct AppFile AppFile;
  69.  
  70. EXTERN_API( void )
  71. CountAppFiles                    (short *                message,
  72.                                  short *                count);
  73.  
  74. EXTERN_API( void )
  75. GetAppFiles                        (short                     index,
  76.                                  AppFile *                theFile);
  77.  
  78. EXTERN_API( void )
  79. ClrAppFiles                        (short                     index);
  80.  
  81. EXTERN_API( void )
  82. GetAppParms                        (Str255                 apName,
  83.                                  short *                apRefNum,
  84.                                  Handle *                apParam)                            ONEWORDINLINE(0xA9F5);
  85.  
  86. #if CGLUESUPPORTED
  87. EXTERN_API_C( void )
  88. getappparms                        (char *                    apName,
  89.                                  short *                apRefNum,
  90.                                  Handle *                apParam);
  91.  
  92. #endif  /* CGLUESUPPORTED */
  93.  
  94. #endif  /* TARGET_CPU_68K &&  !TARGET_RT_MAC_CFM */
  95.  
  96.  
  97. /*
  98.    Because PowerPC applications don’t have segments.
  99.    But, in order to allow applications to not have conditionalized
  100.    source code, UnloadSeg is macro'ed away for PowerPC.
  101. */
  102. #if TARGET_CPU_68K
  103. EXTERN_API( void )
  104. UnloadSeg                        (void *                    routineAddr)                        ONEWORDINLINE(0xA9F1);
  105.  
  106. #else
  107. #define UnloadSeg(x)
  108. #endif  /* TARGET_CPU_68K */
  109.  
  110.  
  111.  
  112.  
  113. #if OLDROUTINELOCATIONS
  114. EXTERN_API( void )
  115. ExitToShell                        (void)                                                        ONEWORDINLINE(0xA9F4);
  116.  
  117. #endif  /* OLDROUTINELOCATIONS */
  118.  
  119.  
  120.  
  121.  
  122. #if PRAGMA_STRUCT_ALIGN
  123.     #pragma options align=reset
  124. #elif PRAGMA_STRUCT_PACKPUSH
  125.     #pragma pack(pop)
  126. #elif PRAGMA_STRUCT_PACK
  127.     #pragma pack()
  128. #endif
  129.  
  130. #ifdef PRAGMA_IMPORT_OFF
  131. #pragma import off
  132. #elif PRAGMA_IMPORT
  133. #pragma import reset
  134. #endif
  135.  
  136. #ifdef __cplusplus
  137. }
  138. #endif
  139.  
  140. #endif /* __SEGLOAD__ */
  141.  
  142.